﻿using 请求响应加密.IService;
using 请求响应加密.Models.SqlSugarDemo;

namespace 请求响应加密.Service
{
    public class UserService : IUserService
    {
        private IHttpContextAccessor _contextAccessor;

        public UserService(IHttpContextAccessor contextAccessor)
        {
            _contextAccessor = contextAccessor;
        }

        public User GetUser(string Id)
        {
            return (User)_contextAccessor.HttpContext.Items["user"];
        }
    }
}
